﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.Windsor;
using Castle.Windsor.Configuration.Interpreters;

namespace Bunian.IoC
{
    public class Reslover
    {
        static WindsorContainer container;
        static Reslover()
        {
            container = new WindsorContainer(new XmlInterpreter("IoC.config"));
        }
        public static void Initializ(XmlInterpreter xmlInterpreter)
        {
            container = new WindsorContainer(xmlInterpreter);
            
        }
        public static T Resolve<T>(string key)
        {
            return container.Resolve<T>(key);
            
        }
        

    }
}
